﻿using System.Xml;

namespace Elifart.Library.Serialization
{
    public static class XamlReader
    {
        #region Static Methods

        public static T Load<T>(string filePath)
        {
            XmlDocument document = new XmlDocument();
            document.Load(filePath);
            return (T)System.Windows.Markup.XamlReader.Load(new XmlNodeReader(document));
        }

        #endregion
    }
}
